
<?php


	function file_get_contents_curl($url, $data = '') {
		$ch = curl_init();

		curl_setopt($ch, CURLOPT_HEADER, FALSE);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); //1 //Set curl to return the data instead of printing it to the browser.
		curl_setopt($ch, CURLOPT_POST, TRUE);
		//	curl_setopt($ch, CURLOPT_RANGE)
		curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
		curl_setopt($ch, CURLOPT_URL, $url);

		$data = curl_exec($ch);
		curl_close($ch);


		return $data;
	}


	$postdata = http_build_query(
	array(
	    'C_1'       =>  'BLB00.17',
	    'C_2'       =>  '',
	    'C_3'       =>  '24012696491',
	'layout'    =>  '8,69,11,8,8,1',
	)
	);



$data = file_get_contents_curl('http://www010.dataprev.gov.br/cws/bin/captcha91_consit.asp', $postdata);

//Substitiu os valores por vazio
$data = str_replace('MPS/INSS', '', $data);
$data = str_replace('Sistema Unico de Beneficios  DATAPREV', '<br>', $data);

// Imprime pagina no navegador
echo $data;
echo '
   ';

?>